package com.cgsd.heyu.adapter;

import android.content.Context;

import com.android.library.adapter.BaseMultiItemAdapter;
import com.android.library.adapter.ViewHolder;
import com.cgsd.heyu.R;
import com.cgsd.heyu.entity.TabEntity;

import java.util.List;

/**
 * @author xiaoxing
 * Description 分享
 * CreateData: 2020/11/5
 */
public class ShareAdapter extends BaseMultiItemAdapter<TabEntity> {

    public ShareAdapter(Context mContext, List<TabEntity> mDatas) {
        super(mContext, mDatas);
    }

    @Override
    protected int muItemViewType(int position, TabEntity tabEntity) {
        return 0;
    }

    @Override
    protected int muLayoutId(int itemType) {
        return R.layout.item_share;
    }

    @Override
    public void convert(ViewHolder holder, TabEntity tabEntity, int position) {
        holder.setImageId(R.id.iv_image,tabEntity.imgResId);
        holder.setText(R.id.tv_title,tabEntity.title);
    }
}
